class: center, middle, inverse, title-slide .title[ # Data Visualization Session ] .subtitle[ ## Usage of unhcthemes package ] .author[ ### Cedric Vidonne ] .institute[ ### IPDA/GDS ] .date[ ### 29 June 2022 ] --- # Objectives **About today:** - Basic of the grammar of graphics and [**`ggplot2`**](https://ggplot2.tidyverse.org/index.html) - Introduction to the [**`unhcrthemes`**](https://vidonne.github.io/unhcrthemes/) package - Best practices to create **UNHCR branded** visuals in R, with examples - What else, dynamic report with the [**`unhcrdown`**](https://github.com/vidonne/unhcrdown) **Not today:** - Data import: [`readr`](https://readr.tidyverse.org/), [`readxl`](https://readxl.tidyverse.org/), etc. - Data manipulation: [`dplyr`](https://dplyr.tidyverse.org/), [`tidyr`](https://tidyr.tidyverse.org/), etc. - R programming: [R for Data Science](https://r4ds.had.co.nz/), [Advanced R Programming](https://adv-r.hadley.nz/), etc. -- See the `xaringan::moon_reader()` package documentation<sup>1</sup> and examples<sup>2</sup> for more information regarding usage. .footnote[ [1] https://github.com/yihui/xaringan [2] https://slides.yihui.org/xaringan/ ] --- class: center, middle # Section title ### An interesting new Section --- # Basic style The templates comes with predefined styles for inline text, such as *italic*, **bold** or <u>underline text</u>. It also includes the requires styles for common elements such as: .pull-left[ **Headers:** ## Heading 2 ### Heading 3 **Lists:** * item 1 * item 2 1. sub-item 2.1 2. sub-item 2.2 ] .pull-right[ **Or quotes:** > It is further proof that refugee movements and the broader issue of migration of populations ... is a global challenge that cannot be confined to a few countries. > > Filippo Grandi ] --- class: inverse, center, middle # Section title - Dark ### An interesting new Section --- # Tables If you want to generate a table, make sure it is in the HTML format (instead of Markdown or other formats), e.g., ```r knitr::kable(head(iris), format = 'html') ``` <table> <thead> <tr> <th style="text-align:right;"> Sepal.Length </th> <th style="text-align:right;"> Sepal.Width </th> <th style="text-align:right;"> Petal.Length </th> <th style="text-align:right;"> Petal.Width </th> <th style="text-align:left;"> Species </th> </tr> </thead> <tbody> <tr> <td style="text-align:right;"> 5.1 </td> <td style="text-align:right;"> 3.5 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.9 </td> <td style="text-align:right;"> 3.0 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.7 </td> <td style="text-align:right;"> 3.2 </td> <td style="text-align:right;"> 1.3 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.6 </td> <td style="text-align:right;"> 3.1 </td> <td style="text-align:right;"> 1.5 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 5.0 </td> <td style="text-align:right;"> 3.6 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 5.4 </td> <td style="text-align:right;"> 3.9 </td> <td style="text-align:right;"> 1.7 </td> <td style="text-align:right;"> 0.4 </td> <td style="text-align:left;"> setosa </td> </tr> </tbody> </table> --- background-image: url(data:image/png;base64,#https://github.com/yihui/xaringan/releases/download/v0.0.2/karl-moustache.jpg) background-position: 50% 50% class: bottom, inverse, hide-logo ### Or a full page picture with no logo --- # Reveal Here's a new slide that show piece by piece -- * One -- * Two -- * Three --- class: inverse, center, middle # Thank you ### Goodbye slide